package com.smzd.core.domain;

import java.io.Serializable;

public class BaseIntIdEntity implements IntIdEntity, Serializable {
	private static final long serialVersionUID = -5670096148351793068L;
	protected Integer id;
	protected String name;
	protected String description;
	protected boolean disabled;
	
	public BaseIntIdEntity() {}
	
	public BaseIntIdEntity(Integer id) {
		this.id = id;
	}

	public BaseIntIdEntity(Integer id, String name) {
		this.id = id;
		this.name = name;
	}

	@Override
	public void setId(Integer id) {
		this.id = id;
	}

	@Override
	public Integer getId() {
		return id;
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer(this.getClass().getSimpleName())
				.append("@").append(hashCode()).append("{").append("id: ")
				.append(id).append(", ").append("name: \"").append(name);
		extStrings(sb);
		sb.append("}");
		return sb.toString();
	}

	protected void extStrings(StringBuffer sb){
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public boolean isDisabled() {
		return disabled;
	}

	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}
}
